import {extend} from "flarum/extend";
import AdminNav from "flarum/components/AdminNav";
import AdminLinkButton from "flarum/components/AdminLinkButton";
import EditorPage from "isoftstone/ueditor/components/EditorPage";

export default function () {
    // create the route
    app.routes['isoftstone-ueditor'] = {path: '/isoftstone/ueditor', component: EditorPage.component()};

    // bind the route we created to the three dots settings button
    // app.extensionSettings['isoftstone-ueditor'] = () => m.route(app.route('isoftstone-ueditor'));

    extend(AdminNav.prototype, 'items', items => {
        // add the Editor tab to the admin navigation menu
        // items.add('isoftstone-ueditor', AdminLinkButton.component({
        //     href: app.route('isoftstone-ueditor'),
        //     icon: 'pencil',
        //     children: app.translator.trans('isoftstone-ueditor.admin.help_texts.title'),
        //     description: app.translator.trans('isoftstone-ueditor.admin.help_texts.description')
        // }));
    });
}
